﻿function valid() {
    var status = new Boolean(true);
    var s = "!@#$%^&*()+=-[]\\\;,'./{}|\":<>?";
    var str = document.getElementById('ctl00_ContentPlaceHolder3_TB_business_unit').value;
    for (var i = 0; i < str.length; i++) {
        if (s.indexOf(str.charAt(i)) != -1) {
            alert("Special characters are not allowed");
            //document.getElementById('ctl00_ContentPlaceHolder3_TB_business_unit').
            status = false
            break;
        }
    }

    var bu_desc = document.getElementById('ctl00_ContentPlaceHolder3_TB_business_unit_desc').value;

    if (str.length > 50) {
        alert("Business Unit ID exceeds max length");
        status = false;

    }
    if (bu_desc.length > 50) {
        alert("Business Unit Description exceeds max length");
        status = false;

    }

    return status;
}